import tool_address as tool

"""
系统入口
功能模块为 tool
"""

while True:
    # 显示菜单
    tool.tips()

    action_str = input('请选择操作功能：')

    print(f"您选择的操作是【{action_str}】")
    print("-" * 50)

    if action_str in ["1", "2", "3", "4"]:
        # 具体功能操作
        action_quit = tool.menu[action_str]["action"]
        getattr(tool, action_quit)()
    elif action_str in ["0", "exit", "quit"]:
        # 退出系统
        action_quit = tool.menu["0"]["action"]
        getattr(tool, action_quit)()
        break
    else:
        print("您输入的不正确，请重新选择")
        pass

